import FullScreen from '@/components/Guide/FullScreen';
export default function App() {
  function getNumber() {
    const mid = Math.ceil(Math.random() * 100);
    return mid < 20 ? mid + 20 : mid;
  }
  function getHomeWork() {
    const one = getNumber();
    const two = getNumber();
    const work = Math.random() > 0.5 ? '+' : '-';
    if (work === '+') {
      return [one, work, two];
    } else if (one > two) {
      return [one, work, two];
    } else {
      return [two, work, one];
    }
  }
  const mid = [];
  for (let i = 0; i < 100; i++) {
    mid.push(getHomeWork());
  }

  return (
    <div>
      <FullScreen />
      <div style={{ display: 'flex', alignItems: 'center' }}>
        <p style={{ flex: '1' }}>姓名：____________ 日期:_____________</p>
        <p style={{ flex: '1' }}>姓名：____________ 日期:_____________</p>
      </div>
      <ul style={{ display: 'flex', flexWrap: 'wrap', paddingLeft: '0px' }}>
        {mid.map((item, index) => {
          return (
            <li
              key={index}
              style={{ width: '150px', height: '40px', listStyle: 'none' }}
            >{`${item[0]} ${item[1]} ${item[2]} =`}</li>
          );
        })}
      </ul>
    </div>
  );
}
